package cn.razgriz.service.impl;

import cn.razgriz.dao.UserDao;
import cn.razgriz.dao.impl.UserDaoImpl;
import cn.razgriz.exception.MyException;
import cn.razgriz.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class UserServiceImpl implements UserService {
    UserDao dao;

    public void setDao(UserDao dao) {
        this.dao = dao;
    }

    @Override
    public void save(){
        dao.save();
    }

    public void throwMyException() throws MyException {
        throw new MyException();
    }
//    public static void main(String[] args) {
//        UserService userService = new UserServiceImpl();
//        userService.save();
//    }
}
